package com.spic.business.alarm.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spic.business.alarm.domain.DeviceAlarmModel;
import com.spic.business.alarm.domain.DeviceInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * DeviceMapper
 *
 * @author liujunyang
 * @version 1.0
 * @date 2021/7/2 14:19
 */
@Mapper
public interface DeviceMapper extends BaseMapper<DeviceAlarmModel> {
    @DS("ods")
    DeviceInfoVo getDeviceByDeviceName(@Param("deviceName") String deviceName);

    @DS("ods")
    DeviceInfoVo getLowestDevice();

    @DS("ods")
    List<DeviceInfoVo> getAllDeviceInfoVo();

    @DS("ods")
    void saveBatchSql(@Param("deviceAlarmModelList")List<DeviceAlarmModel> deviceAlarmModelList);
}
